<template>
  <div class="page-index">
    <input maxlength="10" v-model="roomID" placeholder="请输入房间名" />
    <input maxlength="10" v-model="userID" placeholder="请输入用户名" />
    <button type="primary" @click="toIndex">页面主操作 Normal</button>
  </div>
</template>

<script>
export default {
  data () {
    return {
      roomID: '',
      userID: ''
    }
  },
  components: {
  },
  methods: {
    toIndex () {
      if( !this.roomID || !this.userID){
        wx.showToast({
          title: '请填写信息',
          duration: 2000
        });
        return
      }
      wx.navigateTo({
         url: `../index/main?roomID=${this.roomID}&&userID=${this.userID}`
      });
    }
  },
  onReady () {
  }
}
</script>

<style scoped>
</style>
